package com.xyzm.springnacosconsumer.service.imp;

import com.xyzm.springnacosconsumer.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class IndexServiceImp implements IndexService {
    @Autowired
    RestTemplate restTemplate;

    @Override
    public String hello() {
        String restTemplateForObject = restTemplate.getForObject("http://spring-nacos-provider/index/hello", String.class);
        return restTemplateForObject;
    }
}
